{extend name="base"/}

{block name='second_menu'}
{notempty name="$menu[2]"}
<ul class="layui-nav nc-nav">
    {foreach name="$menu[2]" item="second_menu"}
    <li class="layui-nav-item {$second_menu['selected']}">
        <a href="{$second_menu['url']}" {$second_menu['target']}>{$second_menu['title']}</a>
    </li>
    {/foreach}
</ul>
{/notempty}
{/block}

{block name='crumbs'}{/block}
{block name="main"}
<div class="nc-function-search">
    <button class="layui-btn" onclick="setCron()">任务设置</button>
</div>

<table id="cron_list" lay-filter="cron"></table>

<script type="text/html" id="status">
    <input type="checkbox" name="status" value="{{d.cron_id}}" lay-skin="switch" lay-filter="status" {{ d.status==1 ? 'checked' : '' }}>
</script>
<script type="text/html" id="cron_period">
    <div class="layui-table-cell laytable-cell-1-site_name">
        {{# if(d.cron_period == '1'){ }}
        日
        {{# } else if(d.cron_period == '2') { }}
        时
        {{# } else if(d.cron_period == '3') { }}
        分
        {{# } }}
    </div>
</script>
<script type="text/html" id="operation">
    <a href="#" class="default primary" lay-event="record">事件记录</a>
</script>

<div id="cron_action_box"></div>
<script type="text/html" id="cron_action_html">
    <div class="layui-form cron-action-html" id='cron_action' lay-filter="cron_action">
        <div class="layui-form-item">
            <label class="layui-form-label">事件方式</label>
            <div class="layui-input-block">
                <input type="radio" name="type" value="php" title="php" checked="">
                <input type="radio" name="type" value="window" title="window" {if strtoupper(substr(PHP_OS,0,3))!='WIN' }disabled="" {/if}>
                <input type="radio" name="type" value="linux" title="linux" {if strtoupper(substr(PHP_OS,0,3))=='WIN'}disabled=""{/if}>
            </div>
        </div>
        <input type="hidden" lay-submit lay-filter="save" value="" id="button_set"/>
    </div>
</script>

{/block}

{block name="script"}
<script src="ADMIN_JS/cron_list.js"></script>
{/block}